package org.example.gradleDemo;

import org.example.gradleDemo.nio.TcpServerDemo;

import java.nio.ByteBuffer;

@SuppressWarnings("ALL")
public class ApplicationDemo {
    public static void main(String[] args) {

        Integer abc = Integer.getInteger("my book");
        System.out.println(abc);
        if (args.length > 0) {
            System.out.println("hello gradle " + args[0]);
        }

        ByteBuffer buffer = ByteBuffer.allocate(10);
        print(buffer.toString());
        buffer.put((byte) 1);
        print(String.format("position=%d,limit=%d",buffer.position(),buffer.limit()));
        buffer.put((byte) 'a');
        print(String.format("好的 position=%d,limit=%d",buffer.position(),buffer.limit()));

        buffer.flip();
        print(String.format("position=%d,limit=%d",buffer.position(),buffer.limit()));
        print(buffer.toString());
        print(Integer.valueOf((int)buffer.get()).toString());
        print(Integer.valueOf((int)buffer.get()).toString());


        System.out.println(" show tcp demo!" );
        TcpServerDemo server = new TcpServerDemo();
       // server.StartTcpServer();

        // rebase test dev branch: first commit cccc
        // rebase test dev branch: second commit dddd
        // feature1 commit 3333
        // feature1 commit 4444
        // master comiit 111;
        // master commit 222;
        // feature1 commit 5555
        // master commit next 3333;

    }

    public  static void print(String msg)
    {
        System.out.println(msg);
    }
}
